package org.team751.sensors;

import edu.wpi.first.wpilibj.DigitalInput;

/**
 * This class simply inverts the value returned by DigitalInput::get().<br />
 * This works properly for limit switches that are wired like the limit
 * switches on our 2011 robot (i.e. so that they close the circuit between
 * signal and ground when they are pressed).
 */
public class LimitSwitch extends DigitalInput {
    public LimitSwitch(int channel){
        super(channel);
    }
    
    /**
     * Determine if the limit switch is pressed
     * @return true if the limit switch is pressed, false otherwise
     */
    public boolean get() {
        return !super.get();
    }
    
    
}